<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */

namespace App\Model;

use Hyperf\DbConnection\Model\Model;

/**
 * @property int $id
 * @property string $department_name
 * @property int $parent_id
 * @property string $principal
 * @property string $mobile
 * @property string $email
 * @property string $creator_id
 * @property string $remember_token
 * @property int $department_id
 * @property int $status
 * @property int $sort
 * @property int $created_at
 * @property int $updated_at
 * @property int $deleted_at
 */
class CustomerDepartments extends Model
{
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'customer_departments';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = [
        'id', 'department_name', 'parent_id', 'principal', 'mobile', 'email', 'creator_id', 'status', 'sort', 'created_at', 'updated_at', 'deleted_at',
    ];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'created_at' => 'integer', 'updated_at' => 'integer'];

    protected string $primaryKey = 'id';

    protected ?string $dateFormat = 'U';
}
